package com.yisu.expressway.api.core.mapper;

import com.yisu.expressway.api.domain.request.GoodsInfoRequest;
import com.yisu.expressway.ewf.entity.SpecificationGoods;

public interface SpecificationGoodsMapper {

    int insert(SpecificationGoods record);

    SpecificationGoods selectByPrimaryKey(Long id);

    SpecificationGoods selectBySpecificationGoodsInfo(GoodsInfoRequest goodsInfoRequest);

    int subtractInventoryNum(GoodsInfoRequest goodsInfoRequest);

    /**
     * 添加商品销量
     * @param goodsInfoRequest
     * @return
     */
    boolean addSalesVolume(GoodsInfoRequest goodsInfoRequest);
    /**
     * 添加库存量
     * @param goodsInfoRequest
     * @return
     */
    boolean addInventoryNum(GoodsInfoRequest goodsInfoRequest);
}